The present invention relates generally to the field of kernel pages, and more particularly to “page-in” operations for kernel pages.
As of this writing, the “page (memory)” webpage at the Wikipedia website discloses as follows: “A page, memory page, or virtual page is a fixed-length contiguous block of virtual memory, and it is the smallest unit of data for the following: memory allocation performed by the operating system for a program; and transfer between main memory and any other auxiliary store, such as a hard disk drive. Virtual memory allows a page that does not currently reside in main memory to be addressed and used. If a program tries to access a location in such a page, an exception called a page fault is generated. The hardware or operating system is notified and loads the required page from the auxiliary store (hard disk) automatically. A program addressing the memory has no knowledge of a page fault or a process following it. Thus a program can address more (virtual) RAM than physically exists in the computer. Virtual memory is a scheme that gives users the illusion of working with a large block of contiguous memory space (perhaps even larger than real memory), when in actuality most of their (sic) work is on auxiliary storage (disk). Fixed-size blocks (pages) or variable-size blocks of the job are read into main memory as needed. A transfer of pages between main memory and an auxiliary store, such as a hard disk drive, is referred to as paging or swapping.”
Kernel memory has been configured as pageable so that particular operating systems (OSs) can work in small memory systems. In such systems, kernel data structures may be paged out to a paging space on a secondary computer-readable storage medium in a manner similar to the paging of user-space data. In an OS with a pageable kernel, the kernel data structures that are not pinned in memory and can be paged out to the paging space just like the user-space data. Typically, these kernel pages will be paged out, when no other option is left but to page the kernel data out. Conventionally, kernel pages are paged out relatively infrequently because a typical “order of stealing” specified in a typical LRU (Least Recently Used) cache is as follows (in descending order of preference to page out): (i) file pages; (ii) working segment pages and modified file pages; (iii) encrypted file system pages (relatively low preference for page out to avoid excessive encryption and decryption); and (iv) pageable Kernel and Kernel extensions' data structures. The paged out data is paged into main memory, when there is some demand for that data (for example, demand for further access).